package com.example.demoboot.controller;

import com.example.demoboot.domain.PersonVO;
import com.example.demoboot.domain.SavePersonDTO;
import org.hibernate.validator.HibernateValidator;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;

/**
 * @author: kanggw
 * @date: 2022/1/9
 * @DESCRIPTION:
 */
@RestController
public class HelloController {

    @PostMapping("savePerson")
    public String savePerson(@RequestBody @Valid SavePersonDTO person) {
        PersonVO personVO = new PersonVO();
        personVO.setAge(10);
        System.out.println("save");
        return "success";
    }



}
